package com.atguigu.a_operator;

public class Demo4 {
    public static void main(String[] args) {

        int num = 20;

        num += 30; //num = num + 30;

        System.out.println("num = " + num);//50


        num >>= 1; //num = num >> 1;
        System.out.println("num = " + num);//25

        System.out.println("-----------------");
        byte b = 10;

        // b = b + 20; 编译报错

        //拓展的赋值运算符隐含了强制类型转换
        b += 200; // b = (byte)(b + 20); -> 不报错

        System.out.println("b = " + b);
    }
}
